clear; close all; 
addpath('../utilities') 

load Figure_6_out LEV VOL CDS cut


ff = figure('Position', [100, 100, 800, 730]);
set(ff,'Units','Inches');
pos = get(ff,'Position');
set(ff,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)])
subplot = @(m,n,p)subtightplot(m, n, p, [0.13 0.13], [0.08 0.04], [0.04 0.01]);

subplot(2,4,[1,2]);
plot((cut(1:end-1)+cut(2:end))/2*100,LEV,'r','LineWidth',1.5); hold on; ylim([22.5,39.5])
set(gca,'FontSize',13)
xlabel('Cumulative consumption drop (%)','FontSize',15);
title('Peak Leverage','FontSize',15);
xlim([-25,0]); grid on;
box off;

subplot(2,4,[3,4]);
plot((cut(1:end-1)+cut(2:end))/2*100,VOL,'r','LineWidth',1.5); hold on; ylim([60.5,84.5])
set(gca,'FontSize',13)
xlabel('Cumulative consumption drop (%)','FontSize',15);
title('Peak Equity Volatility','FontSize',15);
xlim([-25,0]); grid on;
box off;

subplot(2,4,[6,7]);
plot((cut(1:end-1)+cut(2:end))/2*100,CDS,'r','LineWidth',1.5); hold on; ylim([2.0,5.3])
set(gca,'FontSize',13)
xlabel('Cumulative consumption drop (%)','FontSize',15);
title('Peak Credit Spread','FontSize',15);
xlim([-25,0]); grid on;
box off;

print(gcf,'figure_6','-dpdf','-r0');

